Function executing device and terminal device for executing wireless communication according to bluetooth low energy

ABSTRACT

A function executing device may comprise a first wireless interface according to a Bluetooth Low Energy scheme being capable of repeatedly sending an advertising signal. The function executing device may after a first advertising signal in which a first radio field intensity is used has been sent from the first wireless interface, receive a specific signal via the first wireless interface from a terminal device, change a radio field intensity used for sending the advertising signal from the first radio field intensity to a second radio field intensity lower than the first radio field intensity, and after a second advertising signal in which the second radio field intensity is used has been sent from the first wireless interface, establish a first wireless connection with the terminal device via the first wireless interface.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a continuation application of U.S. Ser. No.17/878,967 filed on Aug. 2, 2022 which is a continuation application ofU.S. Ser. No. 17/094,379 filed on Nov. 10, 2020, now U.S. Pat. No.11,425,267 issued on Aug. 23, 2022 and claims priority to JapanesePatent Application No. 2019-205683 filed on Nov. 13, 2019, the contentsof which are hereby incorporated by reference into the presentapplication.

TECHNICAL HELD

The disclosure herein discloses art to execute a wireless communicationaccording to a Bluetooth (registered trademark) Low Energy (BLE) schemebetween a function executing device and a terminal device.

DESCRIPTION OF RELATED ART

A communication device configured to execute pairing according to theBLE scheme with an information processing device is known.

SUMMARY

The disclosure herein discloses art to control communication of targetinformation between a function executing device and a terminal device inaccordance with a distance between the function executing device and theterminal device.

A function executing device disclosed herein may comprise: a firstwireless interface configured to execute wireless communicationaccording to a Bluetooth (Registered Trademark) Low Energy (BLE) scheme,the first wireless interface being capable of repeatedly sending anadvertising signal; a processor; and a memory storing computer-readableinstructions, wherein the computer-readable instructions, when executedby the processor, cause the function executing device to: after a firstadvertising signal in which a first radio field intensity is used hasbeen sent from the first wireless interface, receive a specific signalvia the first wireless interface from a terminal device which receivedthe first advertising signal; in a case where the specific signal isreceived from the terminal device, change a radio field intensity usedfor sending the advertising signal from the first radio field intensityto a second radio field intensity that is lower than the first radiofield intensity; after a second advertising signal in which the secondradio field intensity is used has been sent from the first wirelessinterface, receive a first connection request via the first wirelessinterface from the terminal device which received the second advertisingsignal; in a case where the first connection request is received fromthe terminal device, establish a first wireless connection with theterminal device via the first wireless interface; and in a case wherethe first wireless connection with the terminal device is established,communicate target information with the terminal device via the firstwireless interface by using the first wireless connection, the targetinformation being information for using a specific function of thefunction executing device.

Another function executing device disclosed herein may comprise: a firstwireless interface configured to execute wireless communicationaccording to a Bluetooth (Registered Trademark) Low Energy (BLE) scheme,the first wireless interface being capable of repeatedly sending anadvertising signal; a processor; and a memory storing computer-readableinstructions, wherein the computer-readable instructions, when executedby the processor, cause the function executing device to: after a firstadvertising signal in which a first radio field intensity is used hasbeen sent from the first wireless interface, receive a second connectionrequest via the first wireless interface from a terminal device whichreceived the first advertising signal; in a case where the secondconnection request is received from the terminal device, establish asecond wireless connection with the terminal device via the firstwireless interface; in a case where the second wireless connection isestablished with the terminal device, change a radio field intensityused for sending the advertising signal from the first radio fieldintensity to a second radio field intensity that is lower than the firstradio field intensity; after a second advertising signal in which thesecond radio field intensity is used has been sent from the firstwireless interface, receive a first connection request via the firstwireless interface from the terminal device which received the secondadvertising signal; in a case where the first connection request isreceived from the terminal device, establish a first wireless connectionwith the terminal device via the first wireless interface; and in a casewhere the first wireless connection with the terminal device isestablished, communicate target information with the terminal device viathe first wireless interface by using the first wireless connection, thetarget information being information for using a specific function ofthe function executing device.

The disclosure herein discloses a non-transitory computer-readablerecording medium storing computer-readable instructions for a terminaldevice. The computer-readable instructions, when executed by a processorof the terminal device, may cause the terminal device to: receive afirst advertising signal in which a first radio field intensity is usedfrom a function executing device via a wireless interface of theterminal device, the wireless interface being configured to executewireless communication according to a Bluetooth (Registered Trademark)Low Energy (BLE) scheme; after the first advertising signal has beenreceived from the function executing device, send a specific signal tothe function executing device via the wireless interface; after thespecific signal has been sent to the function executing device, receivea second advertising signal in which a second radio field intensity thatis lower than the first radio field intensity is used from the functionexecuting device via the wireless interface; after the secondadvertising signal has been received from the function executing device,send a connection request to the function executing device via thewireless interface, wherein a wireless connection is established withthe function executing device via the wireless interface in response tothe connection request being sent to the function executing device; andin a case where the wireless connection with the function executingdevice is established, communicate target information for using aspecific function of the function executing device with the functionexecuting device via the wireless interface by using the wirelessconnection.

The disclosure herein discloses another non-transitory computer-readablerecording medium storing computer-readable instructions for a terminaldevice. The computer-readable instructions, when executed by a processorof the terminal device, may cause the terminal device to: receive afirst advertising signal in which a first radio field intensity is usedfrom a function executing device via a wireless interface of theterminal device, the wireless interface being configured to executewireless communication according to a Bluetooth (Registered Trademark)Low Energy (BLE) scheme; after the first advertising signal has beenreceived from the function executing device, send a second connectionrequest to the function executing device via the wireless interface,wherein a second wireless connection is established with the functionexecuting device via the wireless interface in response to the secondconnection request being sent to the function executing device; afterthe second wireless connection has been established with the functionexecuting device, receive a second advertising signal in which a secondradio field intensity that is lower than the first radio field intensityis used from the function executing device via the wireless interface;after the second advertising signal has been received from the functionexecuting device, send a first connection request to the functionexecuting device via the wireless interface, wherein a first wirelessconnection is established with the function executing device via thewireless interface in response to the first connection request beingsent to the function executing device; and in a case where the firstwireless connection with the function executing device is established,communicate target information for using a specific function of thefunction executing device with the function executing device via thewireless interface by using the first wireless connection.

Methods implemented by the above function executing devices, computerprograms for realizing the above function executing devices, andnon-transitory computer-readable recording mediums storing thesecomputer programs are also novel and useful. Methods implemented by theabove terminal devices, and the above terminal devices themselves arealso novel and useful. Systems comprising the above function executingdevices and the above terminal devices are also novel and useful.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 shows a configuration of a communication system;

FIG. 2 shows a conceptual diagram of a Primary Service Group of aprinter;

FIG. 3 shows a data structure of the Primary Service Group of theprinter;

FIG. 4 shows a sequence diagram of a process executed by a portableterminal and the printer;

FIG. 5 shows a continuation of FIG. 4 ;

FIG. 6 shows a continuation of FIG. 5 ; and

FIG. 7 shows a continuation of FIG. 6 .

EMBODIMENTS

(Configuration of Communication System 2: FIG. 1 )

As shown in FIG. 1 , a communication system 2 includes a portableterminal 10 (hereinbelow simply termed “terminal 10”) and a printer 100.In the present embodiment, firstly a wireless connection according to aBluetooth Low Energy (BLE) scheme (hereinbelow termed “BT connection”)is established between the terminal 10 and the printer 100, andinformation for establishing a wireless connection according to a Wi-Fischeme (hereinbelow termed “Wi-Fi connection”) is sent from the printer100 to the terminal 10. After this, the Wi-Fi connection is establishedbetween the terminal 10 and the printer 100. As above, in thisembodiment, the shift of communication between the terminal 10 and theprinter 100 from communication according to the BT connection tocommunication according to the Wi-Fi connection is realized. That is, inthe present embodiment, a so-called handover (hereinbelow may be termed“HO”) from the BT connection to the Wi-Fi connection is realized.

(Configuration of Terminal 10)

The terminal 10 is a portable terminal device such as a cell phone(e.g., a smartphone), a PDA, or a tablet PC. The terminal 10 includes adisplay unit 12, a Wi-Fi interface 14, a Bluetooth (registeredtrademark, BT) interface 16, and a controller 30. The respective units12 to 30 are connected by a bus line (reference sign not given).Hereinbelow, an interface will simply be termed “I/F”.

The display unit 12 is a display configured to display various types ofinformation. The display unit 12 also functions as a touch panel (i.e.,an operation unit) for accepting instructions from a user.

The Wi-Fi OF 14 is a wireless interface configured to execute wirelesscommunication according to the Wi-Fi scheme. The Wi-Fi scheme may, forexample, be a wireless communication scheme for executing wirelesscommunication according to 802.11 standard by the Institute ofElectrical and Electronics Engineers, Inc. (IEEE), or standardscomplying therewith (e.g., 802.11a, 11b, 11g, 11n, 11ac). The Wi-Fi OF14 especially supports a Wi-Fi Direct (registered trademark, WFD) schemedeveloped by the Wi-Fi Alliance. The WFD scheme is a wirelesscommunication scheme described in the standard “Wi-Fi Peer-to-Peer (P2P)Technical Specification Version1.1” created by the Wi-Fi Alliance. Theterminal 10 is configured to operate in one of a Group Owner (G/O)state, a Client (CL) state, and a device state of the WFD scheme. Forexample, the terminal 10 may operate as a CL of the WFD scheme andparticipate in a wireless network formed by an external device (such asthe printer 100) operating as a G/O of the WFD scheme.

The BT OF 16 is an OF configured to execute wireless communicationaccording to the BT scheme. The BT scheme is a wireless communicationscheme based on IEEE 802.15.1 standard and standards complyingtherewith. More specifically, the BT OF 16 supports the BLE scheme. TheBLE scheme is a standard realized by the BT scheme version 4.0 or laterversion.

Differences between the Wi-Fi scheme and the BT scheme will bedescribed. A communication speed of the Wi-Fi scheme (e.g., a maximumcommunication speed of 600M bps) is faster than a communication speed ofthe BT scheme (e.g., a maximum communication speed of 24 Mbps). Afrequency of carrier waves used in communication of the Wi-Fi scheme isin 2.4 GHz band or 5.0 GHz band. A frequency of carrier waves used incommunication of the BT scheme is in 2.4 GHz band. Further, a maximumdistance with which communication according to the Wi-Fi scheme can beexecuted (e.g., about 100 m) is greater than a maximum distance withwhich communication according to the BT scheme can be executed (e.g.,about several ten meters).

The controller 30 includes a CPU 32 and a memory 34. The CPU 32 isconfigured to execute various processes in accordance with programs 36and 38 stored in the memory 34. The memory 34 is constituted of avolatile memory, a non-volatile memory, and the like, and stores anOperating System (OS) program 36 (hereinbelow simply termed “OS 36”) anda print application 38 (hereinbelow simply termed “application 38”).

The OS 36 is a program for controlling basic operations of the terminal10, and may, for example, be iOS (registered trademark) or android(registered trademark). The application 38 is an application forexecuting HO with the printer 100 and thereafter sending image datarepresenting an image to be printed to the printer 100 using a Wi-Ficonnection. The application 38 may, for example, be installed in theterminal 10 from a server on the Internet provided by a vendor of theprinter 100, or may be installed in the terminal 10 from a mediumshipped with the printer 100.

(Configuration of Printer 100)

The printer 100 is a peripheral device (e.g., a peripheral device of theterminal 10) configured to execute a print function. A vendor name, amodel name, and a device name of the printer 100 are respectively “AAA”,“BBB”, and “CCC”. The printer 100 includes a display unit 112, a Wi-FiOF 114, a BT I/F 116, a print executing unit 118, and a controller 130.

The display unit 112 is a display configured to display various types ofinformation. The display unit 112 also functions as a touch panel (i.e.,an operation unit) for accepting instructions from the user. The Wi-FiI/F 114 is similar to the Wi-Fi I/F 14 of the terminal 10. That is, theWi-Fi I/F 114 supports the WFD scheme. A MAC address “WF5678-AAA” isassigned to the Wi-Fi I/F 114. This MAC address includes the vendor name“AAA” of the printer 100. The BT I/F 116 is similar to the BT I/F 16 ofthe terminal 10. That is, the BT I/F 116 supports the BLE scheme. A MACaddress “BT1234-AAA” is assigned to the BT I/F 116. This MAC addressincludes the vendor name “AAA” of the printer 100. The print executingunit 118 includes a printing mechanism of inkjet scheme or laser scheme,for example.

The controller 130 includes a CPU 132 and a memory 134. The CPU 132 isconfigured to execute various processes in accordance with a program 136stored in the memory 134. The memory 134 is constituted of a volatilememory, a non-volatile memory, and the like, and stores a protocol stack138 in addition to the program 136.

The protocol stack 138 includes a protocol stack according to the BLEscheme, and has a hierarchical structure shown in FIG. 1 . A LogicalLink Control and Application Protocol (L2CAP) is a stack forestablishing a BT connection (hereinbelow may be termed “L2CAP Link”). ASecurity Manager Protocol (SMP) and an Attribute Protocol (ATT) areupper layers of the L2CAP. The SMP is a protocol for encryptinginformation that is communicated using the BT connection. The ATT is aprotocol for defining an access scheme for communication using the BTconnection between a server and a client. A Generic Attribute Profile(GATT) is an upper layer of the ATT, and is a protocol for definingfunctions of the server and the client. A Generic Access Profile (GAP)is an upper layer of the L2CAP, SMP, ATT, and GATT, and is a protocolfor defining a function that is common among devices capable ofcommunicating according to the BLE scheme. A Primary Service Group is anupper layer of the GAP, and is an application for defining basicoperations related to communication according to the BLE scheme.Hereinbelow, Primary Service will simply be termed “PS”.

(Concept of PS Group: FIG. 2 )

A concept of the PS group included in the protocol stack 138 will bedescribed with reference to FIG. 2 . The table of FIG. 2 conceptuallyillustrates the PS group to facilitate understanding, thus theillustration is different from a specific data structure of the PSgroup. The data structure of the PS group will be described withreference to FIG. 3 after explanation on FIG. 2 . The PS group isdivided into a first-type PS defined by a Bluetooth SIG (i.e.,predetermined by the BT scheme standard) and a second-type PS defined bythe vendor of the printer 100.

(First-Type PS)

The first-type PS includes a GAP Service 138A (hereinbelow simply termed“GA 138A”). The GA 138A is a PS for sending information related to theBT I/F 116. This information includes the device name “CCC”, forexample. A preset UUID “0x1800” is assigned to the GA 138A. The GA 138Aincludes a plurality of Characteristics (hereinbelow simply termed“CHs”). Each CH is information defining a specific function of the PS.The plurality of CHs included in the GA 138A includes a CH “Device Name”which defines transmission of the device name “CCC”. A predeterminedUUID “0x2A00” is assigned to the CH “Device Name”. In FIG. 2 ,illustration of other CHs included in the GA 138A is omitted.

(Second-Type PS)

The second-type PS includes a WFD Connection 138B (hereinbelow simplytermed “WC 138B”) and a BT Control 138C (hereinbelow simply termed “BC138C”).

The WC 138B is a PS for defining communication of respective informationfor establishing a Wi-Fi connection according to the WFD scheme, and aUUID “aaa0” determined by the vendor of the printer 100 is assignedthereto. A plurality of CHs included in the WC 138B includes “PowerControl”, “Handover Mode MAC Address”, “Public Encryption Key”,“Connection Information”, and “Change Status”.

The “Power Control” is a CH (with a UUID “aaa1”) for defining receptionof a Low Power instruction for lowering a radio field intensity used bythe BT I/F 116 (i.e., writing of information in the printer 100). The“Handover Mode MAC Address” is a CH (with a UUID “aaa2”) for definingreception of a MAC address for HO. The “Public Encryption Key” is a CH(with a UUID “aaa3”) for defining reception of an encryption key. The“Connection Information” is a CH (with a UUID “aaa4”) for definingtransmission of information for establishing a Wi-Fi connection (i.e.,reading of information from the printer 100). The “Change Status” is aCH (with a UUID “aaa5”) for defining reception of a WFD startinstruction for causing the printer 100 to operate as the G/O.

The BC 138C is a PS for receiving an instruction for changing a state ofthe BT OF 116, and a UUID “bbb0” determined by the vendor of the printer100 is assigned thereto. A CH included in the BC 138C includes “PairingControl”. The “Pairing Control” is a CH (with a UUID “bbb1”) fordefining reception of a disconnection instruction for disconnecting a BTconnection (i.e., L2CAP Link).

(Data Structure of PS Group: FIG. 3 )

Next, the specific data structure of the PS group will be described withreference to FIG. 3 . The PS group has a table structure in whichHandles, Attribute Types, Attribute Values, and Attribute Permissionsare associated with each other. The Handles are serial numbers continuedfrom “0x0001”. In FIG. 3 , a part of the data structure following“0x0002” is omitted. Due to this, the Handles following “0x0002” are notactual values but are expressed by signs “nk (k is an integer of 1 ormore)”. Each Attribute Type (hereinbelow simply termed “AType”) is anidentifier (i.e., a UUID) indicating a type of information to becommunicated. Each Attribute Value (hereinbelow simply termed “AValue”)indicates information to be communicated. Each Attribute Permission(hereinbelow simply termed “APer”) is an item related to the SMP, morespecifically, it indicates a condition for permitting reading ofinformation from the printer 100 or writing of information in theprinter 100.

In the present embodiment, “Readable without authentication (hereinbelowtermed “RWA”)” or “Writeable without authentication (hereinbelow termed“WWA”)” is described as the A-Per. The RWA indicates that Authenticationis not requested upon reading of information from the printer 100. TheWWA indicates that Authentication is not requested upon writing ofinformation in the printer 100. Although phrases of “without encryption”and “without authorization” are omitted, the RWA and WWA indicate thatneither Encryption nor Authorization is requested upon reading orwriting of information.

(First-Type PS)

The GA 138A includes a data group corresponding to a Handle range of“0x0001” to a predetermined value (which is a value immediatelypreceding “n10”). Data corresponding to the Handle “0x0001” is asfollows. The AType includes a UUID “0x2800” indicating that the data ishead data in the PS. The AValue includes a UUID “0x1800”. The APerincludes the RWA.

Data corresponding to a Handle “0x0002” is as follows. The ATypeincludes a UUID “0x2803” indicating CH Declaration. The AValue includesa property indicating “Read”, a Handle “n1”, and a UUID “0x2A00”. TheAPer includes the RWA.

Data corresponding to a Handle “n1” is as follows. The AType includesthe UUID “0x2A00” corresponding to the CH “Device Name”. The AValueincludes the device name “CCC”. The APer includes the RWA.

Since the GA 138A has the aforementioned data structure, the device name“CCC” in the GA 138A is read as follows. When the printer 100 (i.e., aBT scheme server) receives a Read By Type Request signal in which theUUID “0x2803” is designated from a BT scheme client (e.g., the portableterminal 10), it permits reading of the AValue (i.e., the property“Read”, Handle “n1”, and UUID “0x2A00”), which corresponds to the UUID“0x2803”, according to the RWA indicated by the APer corresponding tothe UUID “0x2803”. As a result, the client can receive the aboveinformation and acknowledge based on the information that reading of theinformation corresponding to the Handle “n1” and the UUID “0x2A00” canbe executed. Then, the client sends a Read By Type Request signal inwhich the UUID “0x2A00” is designated to the printer 100 to receive(i.e., read) the device name “CCC” from the printer 100.

(Second-Type PS)

The WC 138B is a data group corresponding to a Handle range of “n10” to“n20”. Data corresponding to the Handle “n10” is as follows. The ATypeincludes the UUID “0x2800”. The AValue includes the UUID “aaa0”. TheAPer includes the RWA.

Data corresponding to Handles “n11” to “n15” is as follows. Each of theATypes includes the UUID “0x2803”. Each of the AValues includes aproperty “Write” or “Read”, a Handle (e.g., “n16”), and a UUID (e.g.,“aaa1”). Each of the APers includes the RWA.

Data corresponding to a Handle “n16” is as follows. The AType includesthe UUID “aaa1” of the CH “Power Control”. The Low Power instruction isto be written as the AValue by the client. It should be noted that priorto this information being actually written, the AValue includes emptyinformation (e.g., no information). Due to this, in FIG. 3 , theinformation to be written is indicated by a broken line. The APerincludes the WWA.

Since the Handle “n16” of the WC 138B has the aforementioned datastructure, the Low Power instruction is written as the AValuecorresponding to the Handle “n16” as follows. When receiving a Read ByType Request signal in which the UUID “0x2803” is designated from aclient (e.g., the portable terminal 10), the printer 100 (i.e., the BTscheme server) permits the client to read each one of the AValues (i.e.,the property “Read” and “Write”, Handles “n16” to “n20”, and UUIDs“aaa1” to “aaa5”) corresponding to the UUID “0x2803” according to theRWA indicated by the APers corresponding to the UUID “0x2803”. As aresult, the client can read the above information and acknowledge basedon the information that writing of the information corresponding to theHandle “n16” and the UUID “aaa1” can be executed. Then, the client sendsto the printer 100 a Write Request signal that has the Handle “n16”designated therein and includes the Low Power instruction to write theLow Power instruction in the printer 100.

Data corresponding to each of Handles “n17” to “n20” is as shown in thedrawing. A MAC address for HO, an encryption key 200, and a WFD startinstruction are to be written as the AValues corresponding to theHandles “n17”, “n18”, and “n20”, respectively. The AValue correspondingto the Handle “n19” includes information for establishing a Wi-Ficonnection with the printer 100. This information includes an S SID“XXX” of a wireless network in which the printer 100 operates as theG/O, a password “YYY” of this wireless network, the MAC address“WF5678-AAA” of the Wi-Fi I/F 114 of the printer 100, and an IP address“192.168.1.1” of the printer 100.

The BC 138C is a data group corresponding to a Handle range of “n30” to“n32”. Data corresponding to each of Handles “n30” to “n32” is as shownin the drawing. A disconnection instruction is to be written as theAValue corresponding to the Handle “n32”.

(Specific Process: FIG. 4 )

Next, a specific process executed by the terminal 10 and the printer 100will be described with reference to FIGS. 4 to 7 . Especially, since thePS group of the printer 100 has the data structure of FIG. 3 , the CPU132 of the printer 100 can realize the following process according tothe PS group. Hereinbelow, for description of processes executed by theCPU 32 of the terminal 10 according to the OS 36 or the application 38,the OS 36 or the application 38 will be described as the subject ofaction. In FIGS. 4 to 7 , communication between the terminal 10 and theprinter 100 according to the BT scheme and communication therebetweenaccording to the Wi-Fi scheme are indicated respectively with solidlines and broken lines. Further, each communication in FIGS. 4 to 6 isexecuted via the BT I/Fs 16, 116. As such, for description of thecommunication in FIGS. 4 to 6 , the phrase of “via the T I/F 16 (or116)” is omitted.

In T100, power of the printer 100 is turned on by a user. In this case,the CPU 132 of the printer 100 activates the BT I/F 116. As a result,the BT I/F 116 repeatedly sends a first advertising signal in which afirst radio field intensity is used in T102. Here, the first radio fieldintensity is an intensity with which an advertising signal can be sentover ten or more meters. Hereinbelow, the advertising signal will betermed “AD signal”. The first AD signal includes the MAC address“BT1234-AAA”.

In T110, the user performs an operation to activate the application 38,and the user performs an operation to select an image file representingan image to be printed in T112. The image file selected in T112 may be afile stored in the memory 34 of the terminal 10, or may be a fileobtained from an external source.

In T114, the application 38 supplies to the OS 36 a receive instructionfor instructing reception of an AD signal. In this case, the OS 36activates the BT I/F 16 and receives the first AD signal from theprinter 100 in T120. In this case, the OS 36 sends a Scan Request signalto the printer 100 in T122. This signal is a signal for requestingsending of information of the printer 100.

When receiving the Scan Request signal from the terminal 10 (T122), theCPU 132 of the printer 100 sends a Scan Response signal including themodel name “BBB” and the MAC address “BT1234-AAA” to the terminal 10 inT124.

When receiving the Scan Response signal from the printer 100 (T124), theOS 36 supplies the model name “BBB” and the MAC address “BT1234-AAA”included in the signal to the application 38 in T126.

By using the information obtained in T126, the application 38 determineswhether or not the printer 100 has a Power-changing function in T130.Specifically, the application 38 firstly determines whether the obtainedMAC address includes the vendor name “AAA” of the printer 100. In caseof FIG. 4 , the application 38 determines that the obtained MAC addressincludes the vendor name “AAA”, and then determines whether the obtainedmodel name is a model name of a printer having the Power-changingfunction. This determination is executed based on a model list that isprestored in the application 38. The model list includes model names ofprinters having the Power-changing function. In case of FIG. 4 , theapplication 38 determines that the obtained model name is a model nameof a printer having the Power-changing function. Thus, the application38 determines YES in T130 and proceeds to T140.

In a case of determining that the obtained MAC address does not includethe vendor name “AAA” or that the obtained model name is not a modelname of a printer having the Power-changing function, the application 38determines NO in T130 and proceeds to a normal process. Although notshown, the normal process is a process for executing pairing, withoutthe printer lowering a radio field intensity of an AD signal, betweenthe terminal 10 and a printer which is a communication counterpart ofthe terminal 10 and communicating information to establish a Wi-Ficonnection. Specifically, the terminal 10 displays a screen for input ofa PIN code and accepts input of the PIN code displayed on the printer,for example. Then, when authentication of this PIN code is successful,the terminal 10 establishes a BT connection with the printer. Then, theterminal 10 uses the BT connection to receive the information forestablishing a Wi-Fi connection, and establishes a Wi-Fi connectionusing this information. After this, the terminal 10 uses the Wi-Ficonnection to send the image file selected in T112 to the printer.

Processes from T140 are processes for establishing a BT connectionbetween the terminal 10 and the printer 100 without input of a PIN codeto the terminal 10 by the user. Since the user does not need to input aPIN code, usability for the user is improved. In T140, the application38 displays a connection confirmation screen on the display unit 12. Theconnection confirmation screen is a screen for asking the user whetherto establish a BT connection with the printer 100 having the model name“BBB” obtained in T126. The connection confirmation screen includes aYES button and a Cancel button.

In T142, the YES button in the connection confirmation screen isselected by the user. In this case, the application 38 supplies to theOS 36 a connection instruction for instructing establishment of a BTconnection in T143. In this case, the OS 36 sends a CONNECT_IND signalto the printer 100 in T144.

When receiving the CONNECT_IND signal from the terminal 10 (T144), theCPU 132 establishes an L2CAP Link (i.e., BT connection) with theterminal 10 in T146. Then, in T148, the CPU 132 instructs the BT I/F 116to stop sending the first AD signal.

(Process Continued from FIG. 4 : FIG. 5 )

In T200 of FIG. 5 , the OS 36 uses the L2CAP Link established in T146 ofFIG. 4 to communicate structure information with the printer 100.Specifically, the OS 36 receives from the printer 100 respective data(i.e., Handles, AValues, and APers; see FIG. 3 ) corresponding to theATypes indicating the UUID “0x2800” or “0x2803” in the PS group. Then,in T210, the OS 36 supplies to the application 38 a completionnotification indicating that the establishment of the L2CAP Link and thecommunication of the structure information have been completed.

When obtaining the completion notification from the OS 36 (T210), theapplication 38 supplies to the OS 36 an information request forrequesting supply of the structure information in T212. Then, theapplication 38 obtains the structure information from the OS 36 in T214.By referring to the obtained structure information (especially theAValues), the application 38 can acknowledge the types (i.e., Read orWrite), Handles, and UUIDs of information to be communicated (see theAValues in FIG. 3 ).

In T220, the application 38 creates a MAC address “9876-DDD” for HO. AMAC address for HO is created by selecting multiple characters atrandom, for example. Due to this, a unique MAC address for HO iscreated.

In T230, the application 38 supplies a write instruction including theHandle “n16” and the Low Power instruction to the OS 36. Due to this,the OS 36 sends a Write Request signal including the above informationto the printer 100 in T232.

When receiving the Write Request signal from the terminal 10 (T232), theCPU 132 stores (i.e., writes) the Low Power instruction as the value ofthe AValue corresponding to the Handle “n16”. Then, in T234, the CPU 132supplies the Low Power instruction to the BT I/F 116. As a result, inprocesses to be described later, the BT I/F 116 can send a second ADsignal using a second radio field intensity that is lower than the firstradio field intensity (see T102 of FIG. 4 ).

In T240, the application 38 supplies a write instruction including theHandle “n17” and the MAC address “9876-DDD” for HO created in T220 tothe OS 36. Due to this, in T242, the OS 36 sends a Write Request signalincluding the above information to the printer 100.

When receiving the Write Request signal from the terminal 10 (T242), theCPU 132 stores the MAC address “9876-DDD” for HO as the value of theAValue corresponding to the Handle “n17”.

In T250, the application 38 supplies a write instruction including theHandle “n18” and the predetermined encryption key 200 to the OS 36. Dueto this, in T252, the OS 36 sends a Write Request signal including theabove information to the printer 100.

When receiving the Write Request signal from the terminal 10 (T252), theCPU 132 stores the encryption key 200 as the value of the AValuecorresponding to the Handle “n18”.

In T260, the application 38 supplies a write instruction including theHandle “n32” and the disconnection instruction to the OS 36. Due tothis, in T262, the OS 36 sends a Write Request signal including theabove information to the printer 100.

When receiving the Write Request signal from the terminal 10 (T262), theCPU 132 stores the disconnection instruction as the value of the AValuecorresponding to the Handle “n32”. Then, in T264, the CPU 132disconnects the L2CAP Link established in T146 of FIG. 4 by sending adisconnect signal to the terminal 10.

When the application 38 completes supplying the respective writeinstructions to the OS 36 (i.e., when completing T260), it displays anotification screen on the display unit 12 in T270. The notificationscreen includes a message prompting the user to bring the terminal 10closer to the printer 100 having the model name “BBB” obtained in T126of FIG. 4 . Due to this, the user can acknowledge that he/she shouldapproach the printer 100 with the terminal 10.

(Process Continued from FIG. 5 : FIG. 6 )

When disconnecting the L2CAP Link in T264 of FIG. 5 , the CPU 132supplies the MAC address “9876-DDD” for HO received in T242 of FIG. 5 tothe BT OF 116. Due to this, in T302, the BT OF 116 repeatedly sends asecond AD signal including the MAC address “9876-DDD” for HO. The LowPower instruction has already been supplied to the BT OF 116 in T234 ofFIG. 5 . Due to this, the BT OF 116 sends the second AD signal in whichthe second radio field intensity that is lower than the first radiofield intensity (see T102 of FIG. 4 ) is used. Here, the second radiofield intensity is an intensity with which an AD signal can be sent overless than ten meters, and in the present embodiment, it is an intensitywith which an AD signal can be sent over about one meter.

In T304, the application 38 supplies a receive instruction to the OS 36.This instruction is similar to the instruction in T114 of FIG. 4 . Then,in T310, the terminal 10 is brought closer to the printer 100 so thatthe distance between the terminal 10 and the printer 100 is within asending range of the second AD signal. In this case, the OS 36 receivesthe second AD signal from the printer 100 in T320. T322 to T326 aresimilar to T122 to T126 of FIG. 4 except that “9876-DDD” is used insteadof “BT1234-AAA” as the MAC address.

Next, in T330, the application 38 uses the information obtained in T326to determine whether the printer that is the source of the second ADsignal is the printer that is the destination of the Low Powerinstruction in T232 of FIG. 5 . Specifically, the application 38determines whether the MAC address obtained in T326 matches the MACaddress for HO created in T220 of FIG. 5 . In case of FIG. 6 , theapplication 38 determines that the obtained MAC address “9876-DDD”matches the MAC address for HO (YES in T330) and proceeds to T343. Onthe other hand, in a case of determining that the obtained MAC addressdoes not match the MAC address for HO, the application 38 continues tomonitor further reception of an AD signal until a predetermined timeelapse. When the predetermined time elapses without the application 38determining that the obtained MAC address matches the MAC address forHO, the application 38 determines NO in T330 and terminates the process.As above, in the present embodiment, the MAC address included in thefirst AD signal and the MAC address included in the second AD signaldiffer, and the application 38 does not execute processes from T343 inthe case where the MAC address included in the second AD signal does notmatch the MAC address for HO. As such, for example, the terminal 10 doesnot execute the processes from T343 even if the terminal 10 receives anAD signal from a printer different from the printer 100 which is thedestination of the Low Power instruction. Due to this, the processesfrom T343 can be executed between the terminal 10 and the suitableprinter 100.

T343 to T346 are similar to T143 to T146 of FIG. 4 . When an L2CAP Linkis established in T346, the CPU 132 instructs the BT I/F 116 to stopsending the second AD signal in T348. T400 to T414 are similar to T200to T214 of FIG. 5 .

In T420, the application 38 supplies a read instruction including theHandle “n19” to the OS 36. Due to this, the OS 36 sends to the printer100 a Read by Type Request signal including the UUID “aaa4” (see theAValue corresponding to the Handle “n14” in FIG. 3 ) corresponding tothe Handle “n19” in T422.

When receiving the Read by Type Request signal from the terminal 10(T422), the CPU 132 firstly obtains the value of the AValuecorresponding to the UUID “aaa4” in the PS group. That is, the CPU 132obtains the SSID “XXX”, the password “YYY”, the MAC address“WF5678-AAA”, and the IP address “192.168.1.1” (see the AValuecorresponding to the Handle “n19” in FIG. 3 ). Then, in T424, the CPU132 uses the encryption key 200 received in T252 of FIG. 5 to encryptthe obtained information to create encrypted data. Then, the CPU 132sends the created encrypted data to the terminal 10 in T426. As above,the printer 100 sends the encrypted data to the terminal 10, whichprevents a terminal different from the terminal 10 from obtaining theinformation such as the SSID “XXX” and the password “YYY”.

When receiving the encrypted data from the printer 100 (T426), the OS 36supplies the encrypted data to the application 38 in T428.

(Process Continued from FIG. 6 : FIG. 7 )

In T430 of FIG. 7 , the application 38 supplies a write instructionincluding the Handle “n20” and the WFD start instruction to the OS 36.Due to this, the OS 36 sends a Write Request signal including the aboveinformation to the printer 100 in T432.

When receiving the Write Request signal from the terminal 10 (T432), theCPU 132 stores the WFD start instruction as the value of the AValuecorresponding to the Handle “n20” in the PS group. Then, in T434, theCPU 132 shifts the state of the printer 100 to the G/O state from astate other than the G/O state of the WFD scheme (e.g., so-called devicestate).

In T500, the application 38 uses the encryption key 200 to decrypt theencrypted data obtained in T428 of FIG. 6 . As a result, the application38 can obtain the SSID “XXX”, the password “YYY”, the MAC address“WF5678-AAA”, and the IP address “192.168.1.1”. Then, the application 38supplies to the OS 36 a Wi-Fi instruction including the SSID “XXX”, thepassword “YYY”, and the MAC address “WF5678-AAA” in T502.

When obtaining the Wi-Fi instruction from the application 38 (T502), theOS 36 activates the Wi-Fi OF 14, and in T504, it broadcasts a ProbeRequest signal via the Wi-Fi OF 14.

When receiving the Probe Request signal from the terminal 10 via theWi-Fi OF 114 (T504), the CPU 132 sends a Probe Response signal includingthe SSID “XXX” and the MAC address “WF5678-AAA” to the terminal 10 viathe Wi-Fi OF 114 in T506.

When receiving the Probe Response signal from the printer 100 via theWi-Fi OF 14 (T506), the OS 36 determines that the SSID “XXX” included inthis signal matches the SSID obtained in T500, and determines that theMAC address “WF5678-AAA” included in this signal matches the MAC addressobtained in T500. That is, the OS 36 determines that the printer 100,which is the source of the Probe Response signal, is a device with whicha Wi-Fi connection is to be established.

In T510, the OS 36 executes connection establishing communication withthe printer 100 via the Wi-Fi OF 14. The connection establishingcommunication includes various types of communication such asAuthentication, Association, and 4-Way Handshake. In the course of theconnection establishing communication, data obtained by using the SSID“XXX” and the password “YYY” obtained in T500 is sent to the printer100, and authentication is executed in the printer 100. In this case,since the authentication is successful, a Wi-Fi connection isestablished between the terminal 10 and the printer 100 in T512. Whenthe Wi-Fi connection with the printer 100 is established (T512), the OS36 supplies to the application 38 a completion notification indicatingthat establishment of the Wi-Fi connection has been completed in T514.

When the Wi-Fi connection with the terminal 10 is established (T512),the CPU 132 disconnects the L2CAP Link established in T346 of FIG. 6 bysending a disconnect signal to the terminal via the BT OF 116 in T520.Then, the CPU 132 supplies a High Power instruction to the BT OF 116 inT522. Due to this, the BT OF 116 repeatedly sends a first AD signalusing the first radio field intensity in T524. The first AD signal sentin T524 is similar to the first AD signal sent in T102 of FIG. 4 , andincludes the MAC address “BT1234-AAA” assigned in advance to the BT OF116 instead of the MAC address “9876-DDD” for HO. As above, once thecommunication of information such as the SSID “XXX” and the password“YYY” is completed, the printer 100 can restore the radio fieldintensity used for sending AD signal to the original setting. Althoughnot shown, the CPU 132 deletes the information stored in response to therespective Write Request signals received in T232, T242, T252, and T262of FIGS. 5 and T432 of FIG. 7 .

When obtaining the completion notification from the OS 36 (T514), theapplication 38 supplies to the OS 36 a send instruction for instructingsending of an image file in T530. The send instruction includes the IPaddress “192.168.1.1” obtained in T500 of FIG. 7 and a file name of theimage file selected in T112 of FIG. 4 . Due to this, in T532, the OS 36uses the Wi-Fi connection established in T512 to send the image file tothe printer 100 with the IP address “192.168.1.1” as its destination.

When receiving the image file from the terminal 10 (T532), the CPU 132instructs the print executing unit 118 to print the image represented bythe image file in T534. As a result, the print executing unit 118executes printing of the image. Further, the CPU 132 shifts the state ofthe printer 100 from the G/O state to a state other than the G/O statein T536. As a result, the Wi-Fi connection established in T512 isdisconnected.

(Effects of Present Embodiment)

According to the present embodiment, in the case where the printer 100receives the CONNECT_IND signal from the terminal 10 (T144) after havingsent the first AD signal in which the first radio field intensity isused (T102 of FIG. 4 ), it establishes the L2CAP Link with the terminal10 (T146). In the case of receiving the Write Request including the LowPower instruction from the terminal 10 using the L2CAP Link (T232 ofFIG. 5 ), the printer 100 changes the radio field intensity used forsending AD signal from the first radio field intensity to the secondradio field intensity which is lower than the first radio fieldintensity (T234). Due to this, the terminal 10 cannot receive the secondAD signal in which the second radio field intensity is used from theprinter 100 unless the distance between the printer 100 and the terminal10 decreases. Then, in the case of receiving the Write Request includingthe disconnection instruction from the terminal 10 (T262), the printer100 disconnects the L2CAP Link and sends the second AD signal in whichthe second radio field intensity is used (T302 of FIG. 6 ). In the casewhere the printer 100 receives the CONNECT_IND signal from the terminal10 (T344) which received the second AD signal as the result of decreasein the distance between the printer 100 and the terminal 10 (within 1meter in the present embodiment), the printer 100 establishes the L2CAPLink with the terminal 10 (T346). The printer 100 communicates theinformation such as the SSID “XXX” and the password “YYY” with theterminal 10 using this L2CAP Link (T422). Then, the printer 100establishes the Wi-Fi connection with the terminal 10 using the aboveinformation (T512 of FIG. 7 ), receives the image file from the terminal10 using the Wi-Fi connection (T532), and executes printing of the imagerepresented by the image file (T534).

Here, a comparative example is assumed in which the information such asthe SSID “XXX” is communicated using the L2CAP Link established in T146of FIG. 4 . In this comparative example, in a case where the distancebetween the printer 100 and the terminal 10 is relatively large (10meters or more in the present embodiment), the above information iscommunicated without authentication of a PIN code (i.e., withoutpairing). In this case, for example, if the printer 100 is installed inan office of a company, the terminal 10 located at a place differentfrom this office (e.g., in an office of another company next to theoffice where the printer 100 is installed) may receive the informationsuch as the SSID “XXX” from the printer 100. Further, the terminal 10can use this information to establish a Wi-Fi connection with theprinter 100 and cause the printer 100 to execute printing of an image.As above, in the comparative example, a third party that is not alegitimate user of the printer 100 can use the printer 100. Contrary tothis, according to the present embodiment, the information such as theSSID “XXX” is not communicated using the L2CAP Link established in T146of FIG. 4 . The above information is communicated using the L2CAP Link(see T346 of FIG. 6 ) which is established as the result of the radiofield intensity used for sending AD signal being lowered and thedistance between the printer 100 and the terminal 10 being decreased. Inother words, the above information is not communicated unless the userbrings the terminal 10 close to the printer 100, which prevents a thirdparty from using the printer 100. As above, according to the presentembodiment, the printer 100 and the terminal 10 can suitably control thecommunication of the above information in accordance with the distancebetween the printer 100 and the terminal 10.

(Corresponding Relationships)

The printer 100, the terminal 10, the BT I/F 116, the Wi-Fi I/F 114, andthe BT I/F 16 are respectively examples of “function executing device”,“terminal device”, “first wireless interface”, “second wirelessinterface”, and “wireless interface”. The Low Power instructioncommunicated in T232 of FIG. 5 is an example of “specific signal”. TheCONNECT_IND signal of T344 of FIG. 6 and the CONNECT_IND signal in T144of FIG. 4 are respectively examples of “first connection request (orconnection request)” and “second connection request”. The L2CAP Link inT346 of FIG. 6 , the L2CAP Link in T146 of FIG. 4 , and the Wi-Ficonnection in T512 of FIG. 7 are respectively examples of “firstwireless connection (or wireless connection)”, “second wirelessconnection”, and “third wireless connection”. The information such asthe SSID “XXX” and the password “YYY” communicated in T426 of FIG. 6 isan example of “target information”. The MAC address “BT1234-AAA” and theMAC address “9876-DDD” are respectively examples of “firstidentification information” and “second identification information”.

The process of T144 and the process of T146 of FIG. 4 are respectivelyexamples of “receive a second connection request” and “establish asecond wireless connection”. The process of T232, the process of T242,the process of T252, and the process of T264 of FIG. 5 are respectivelyexamples of “receive a specific signal”, “communicate secondidentification information”, “communicate an encryption key”, and“disconnect the second wireless connection”. The process of T302, theprocess of T344, the process of T346, and the process of T426 of FIG. 6are respectively examples of “change a radio field intensity used forsending the advertising signal from the first radio field intensity to asecond radio field intensity”, “receive a first connection request”,“establish a first wireless connection”, and “communicate targetinformation”. The process of T522, the process of T532, and the processof T534 of FIG. 7 are respectively examples of “change the radio fieldintensity used for sending the advertising signal from the second radiofield intensity to the first radio field intensity”, “receive imagedata”, and “cause the print executing unit to print the image”.

The processes of T114 and T120 of FIG. 4 are an example of “receive afirst advertising signal”. The processes of T143 and T144 are an exampleof “send a second connection request”. The processes of T230 and T232 ofFIG. 5 are an example of “send a specific signal”. The processes of T304and T320 of FIG. 6 are an example of “receive a second advertisingsignal”. The processes of T343 and T344 are an example of “send aconnection request (or send a first connection request)”. The processesof T420, T422, and T426 are an example of “communicate targetinformation”.

(Variant 1) The printer 100 may not receive the Low Power instruction inT232 of FIG. 5 . In this case, for example, the printer 100 may lowerthe radio field intensity used for sending the AD signal on conditionthat the printer 100 receives the Scan Request signal in T122 of FIG. 4. In this variant, the Scan Request signal is an example of the“specific signal”. Especially in the present variant, the L2CAP Link ofT146 may not be established. That is, “receive a second connectionrequest”, “establish a second wireless connection”, and “disconnect thesecond wireless connection” by the “function executing device” may beomitted. Further, “send a second connection request” by the “terminaldevice” may also be omitted. Further, in another variant, the printer100 may lower the radio field intensity used for sending the AD signalon condition that the printer 100 receives the CONNECT_IND signal inT144 of FIG. 4 . In this variant, the CONNECT_IND signal is an exampleof the “specific signal”.

(Variant 2) The printer 100 may lower the radio field intensity used forsending the AD signal on condition that the L2CAP Link in T146 of FIG. 4is established, without receiving the Low Power instruction of T232 ofFIG. 5 . In this variant, “receive a specific signal” by the “functionexecuting device” may be omitted. Further, “send a specific signal” bythe “terminal device” may also be omitted.

(Variant 3) The terminal 10 may shift to the G/O state instead of theprinter 100 shifting to the G/O state. In this case, the printer 100 mayreceive from the terminal 10 an SSID, a password, etc. of a wirelessnetwork in which the terminal 10 operates as the G/O instead of theprinter 100 sending the SSID, etc. to the terminal 10 in T426 of FIG. 6. In general terms, “communicate target information” between the“function executing device” and the “terminal device” may be executed bythe function executing device sending the target information to theterminal device as in the above embodiment or by the terminal devicesending the target information to the function executing device as inthe present variant.

(Variant 4) In T426 of FIG. 6 , the printer 100 may send to the terminal10 a login password for logging into the printer 100 instead of theSSID, etc. In this case, the terminal 10 displays the login password,and the user can log into the printer 100 (i.e., the user can bring theprinter 100 to a usable state) by inputting this login password to theprinter 100. In this variant, the login password is an example of the“target information”, and the “second wireless interface”, “receiveimage data”, and “cause the print executing unit to print the image” inthe “function executing device” may be omitted. Further, the “targetinformation” may be other information for using the specific function ofthe function executing device (e.g., information indicating a status ofthe printer 100, information of print history stored in the printer 100,etc.).

(Variant 5) The printer 100 may start sending the second AD signal in astate where the L2CAP Link is established after the Low Powerinstruction has been supplied to the BT OF 116 in T234 of FIG. 5 . Ingeneral terms, the second advertising signal may be sent before thesecond wireless connection is disconnected.

(Variant 6) The printer 100 may disconnect the L2CAP Link on conditionthat the printer 100 receives the encryption key in T252, for example,even if the printer 100 does not receive the disconnection instructionof T262 of FIG. 5 . In the present variant, “receive a disconnectioninstruction” by the “function executing device” may be omitted.

(Variant 7) The printer 100 may not receive the MAC address “9876-DDD”in T242 of FIG. 5 from the terminal 10. Further, in T302 of FIG. 6 , theprinter 100 may send a second AD signal including a MAC address thatmatches the MAC address “BT1234-AAA” included in the first AD signal. Inthis case, the terminal 10 proceeds to T343 without executing theprocess of T330. In the present variant, “communicate secondidentification information” by the “function executing device” may beomitted, and the second advertising signal does not include the secondidentification information.

(Variant 8) The printer 100 may create a unique MAC address and sendthis MAC address to the terminal 10 instead of receiving the MAC address“9876-DDD” from the terminal 10 in T242 of FIG. 5 . In this case, theprinter 100 sends a second AD signal including this unique MAC addressin T302 of FIG. 6 . The terminal 10 executes the determination of T330using this MAC address received from the printer 100. In general terms,“communicate second identification information” may include sending thesecond identification information from the terminal device to thefunction executing device as in the above embodiment, or include sendingthe second identification information from the function executing deviceto the terminal device as in this variant.

(Variant 9) The printer 100 may not receive the encryption key 200 fromthe terminal 10 in T252 of FIG. 5 . In this case, the printer 100 maynot encrypt the information such as the S SID “XXX” and the password“YYY”, and may send these information to the terminal 10 in T426 of FIG.6 . In this variant, “communicate an encryption key” by the “functionexecuting device” may be omitted.

(Variant 10) The printer 100 may send the encryption key 200 to theterminal 10 in T252 of FIG. 5 instead of receiving the encryption key200 from the terminal 10. In general terms, “communicate an encryptionkey” may include sending the encryption key from the terminal device tothe function executing device as in the above embodiment, or includesending the encryption key from the function executing device to theterminal device as in this variant.

(Variant 11) The “function executing device” may not be the printer 100,and may, for example, be a scanner, a FAX device, a multi-functionperipheral, a PC, or a server.

(Variant 12) In the above embodiment, the respective processes of FIGS.4 to 7 are implemented by the CPU 132 of the printer 100 executing theprogram 136 (that is, software) and the CPU 32 of the terminal device 10executing the programs 36, 38. Instead of this, one or more of theprocesses may be implemented by hardware such as a logic circuit.

What is claimed is:
 1. A function executing device comprising: a firstwireless interface configured to execute wireless communicationaccording to a Bluetooth (Registered Trademark) Low Energy (BLE) scheme,the first wireless interface being capable of sending an advertisingsignal; a second wireless interface configured to execute wirelesscommunication according to a Wi-Fi (Registered Trademark) scheme; aprocessor; and a memory storing computer-readable instructions, whereinthe computer-readable instructions, when executed by the processor,cause the function executing device to: send a first advertising signalfrom the first wireless interface; after sending of the firstadvertising signal is stopped, send a second advertising signal from thefirst wireless interface, wherein a distance at which the secondadvertising signal is capable of being received by an external device isshorter than a distance at which the first advertising signal is capableof being received by the external device; after receiving a specificsignal via the first wireless interface from a terminal device which hasreceived the second advertising signal, send target information to theterminal device which is a sender of the specific signal via the firstwireless interface; in a case where a Wi-Fi connection request isreceived from the terminal device after the target information is sentto the terminal device, establish a Wi-Fi connection with the terminaldevice via the second wireless interface.
 2. The function executingdevice as in claim 1, further comprising: a print executing unit,wherein the computer-readable instructions, when executed by theprocessor, further cause the function executing device to: in a casewhere the Wi-Fi wireless connection is established, receive image datarepresenting an image to be printed from the terminal device via thesecond wireless interface by using the Wi-Fi wireless connection; and ina case where the image data is received from the terminal device, causethe print executing unit to print the image represented by the imagedata.
 3. The function executing device as in claim 1, wherein thecomputer-readable instructions, when executed by the processor, furthercause the function executing device to: after sending of the firstadvertising signal is stopped, change a radio field intensity used forsending the advertising signal from a first radio field intensity forthe first advertising signal to a second radio field intensity for thesecond advertising signal.
 4. The function executing device as in claim3, wherein the computer-readable instructions, when executed by theprocessor, further cause the function executing device to: after thetarget information is sent to the terminal device, change the radiofield intensity used for sending the advertising signal from the secondradio field intensity to the first radio field intensity.
 5. Thefunction executing device as in claim 1, wherein the computer-readableinstructions, when executed by the processor, further cause the functionexecuting device to: establish a link via the first wireless interfacewith the terminal device which has received the first advertising signalfrom the function executing device; and wherein the second advertisingsignal is sent from the first wireless interface after the link has beendisconnected.
 6. The function executing device as in claim 5, whereinthe computer-readable instructions, when executed by the processor,further cause the function executing device to: receive a disconnectioninstruction from the terminal device via the first wireless interface byusing the link, and the link is disconnected in a case where thedisconnection instruction is received from the terminal device.
 7. Thefunction executing device as in claim 1, wherein the first advertisingsignal includes first identification information for identifying thefunction executing device, the computer-readable instructions, whenexecuted by the processor, further cause the function executing deviceto: communicate, via the first wireless interface, second identificationinformation with the terminal device which has received the firstadvertising signal from the function executing device, the secondidentification information being information for identifying thefunction executing device and being different from the firstidentification information, and the second advertising signal includesthe second identification information.
 8. The function executing deviceas in claim 1, wherein the computer-readable instructions, when executedby the processor, further cause the function executing device to:communicate, via the first wireless interface, an encryption key withthe terminal device which has been received the first advertising signalfrom the function executing device, and the target information which issent to the terminal device is encrypted by the encryption key.